<script type="text/javascript" src="/static/layui/layui.js"></script>
<script type="text/javascript" src="/static/icheck/icheck.js"></script>
<script type="text/javascript" src="/static/backend/javascript/dw.js"></script>
<script>
    $(function(){
        //菜单选择效果
        $(".layui-nav-tree a").removeClass("layui-this");
        $(".layui-nav-tree li").removeClass("layui-nav-itemed");
        var href = window.location.pathname;
        $(".layui-nav-tree li").each(function(){
            $(this).find('a').each(function(){
                var url = $(this).attr('href');
                if(url == href){
                    $(this).addClass('layui-this');
                    $(this).parent().parent().parent().addClass("layui-nav-itemed");
                    $(this).parent().addClass("layui-nav-itemed");
                }

            });
        });
        layui.use(['layer','form'],function(){
            $('.dw-security').click(function(){
                var dw_url    = $(this).attr("dw-url");//URL地址，必填
                var dw_title  = $(this).attr("dw-title");//弹出层标题，必填
                var dw_width  = $(this).attr("dw-width");//弹出层宽度，如80%或500px；如果没有默认为屏幕宽度的50%
                var dw_height = $(this).attr("dw-height");//弹出层高度，如50%或500px；如果没有默认为屏幕高度的50%
                if (dw_url == undefined) {
                    layer.msg("请给button加上dw-url属性");
                    return false;
                }
                if (dw_title == undefined) {
                    layer.msg("请给button加上dw-title属性");
                    return false;
                }
                if (dw_width == undefined) dw_width = '50%';
                if (dw_height == undefined) dw_height = '50%';
                layer.open({
                    type: 2,
                    title: dw_title,
                    shadeClose: true,
                    shade: 0.8,
                    area: [dw_width, dw_height],
                    content: dw_url
                });
            });
        });
        $(document).on("click",".layui-layer-close",function(){
            $(".layui-layer-shade").remove();
            $(".layui-layer-iframe").remove();

        });
    })
</script>
</body>
</html>
@yield('content_js')
